<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>

	<title>回收站主页</title>

</head>
<body>

	<p align="center">
		<h2>回收站主页</h2>
	</p>
	<table border="1" width="100%">
		<form action="trash" method="post">
			<tr height="50px">
				<td colspan="9" align="center">
					<select name="cate_condition">
						<option value="0">所有分类</option>
						<?php if(is_array($cate)): $i = 0; $__LIST__ = $cate;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>" <?php if(($_POST['cate_condition']) == $vo["id"]): ?>selected="selected"<?php endif; ?>>|<?php echo (str_repeat('--',$vo["lev"])); echo ($vo["c_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
					</select>
					<select name="is_sale">
						<option value="0">选择上架</option>
						<option value="1" <?php if(($_POST['is_sale']) == "1"): ?>selected="selected"<?php endif; ?>>上架</option>
						<option value="2" <?php if(($_POST['is_sale']) == "2"): ?>selected="selected"<?php endif; ?>>未上架</option>
					</select>
					<select name="attribute">
						<option>选择属性</option>
						<option value="is_hot" <?php if(($_POST['attribute']) == "is_hot"): ?>selected="selected"<?php endif; ?>>推荐</option>
						<option value="is_rec" <?php if(($_POST['attribute']) == "is_rec"): ?>selected="selected"<?php endif; ?>>热卖</option>
						<option value="is_new" <?php if(($_POST['attribute']) == "is_new"): ?>selected="selected"<?php endif; ?>>新品</option>
					</select>
					<input type="text" name="goods_name" placeholder="请输入商品关键字" value="<?php echo ($_POST['goods_name']); ?>">
					<input type="submit" value="查询">
					<input type="reset" value="重置">
				</td>
			</tr>
		</form>
		<tr>
			<th>编号</th>
			<th>商品名称</th>
			<th>货号</th>
			<th>价格</th>
			<th>上架</th>
			<th>推荐</th>
			<th>热销</th>
			<th>新品</th>
			<th>操作</th>
		</tr>
		<?php if(is_array($data["data"])): $i = 0; $__LIST__ = $data["data"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr align="center">
				<td><?php echo ($vo["id"]); ?></td>
				<td><?php echo ($vo["goods_name"]); ?></td>
				<td><?php echo ($vo["goods_sn"]); ?></td>
				<td><?php echo ($vo["shop_price"]); ?></td>

				<td>
					<?php if(($vo["is_sale"]) == "1"): ?>是<?php else: ?>否<?php endif; ?>
				</td>
				<td>
					<?php if(($vo["is_hot"]) == "1"): ?>是<?php else: ?>否<?php endif; ?>
				</td>
				<td>
					<?php if(($vo["is_rec"]) == "1"): ?>是<?php else: ?>否<?php endif; ?>
				</td>
				<td>
					<?php if(($vo["is_new"]) == "1"): ?>是<?php else: ?>否<?php endif; ?>
				</td>
				<td>
					<a href="<?php echo U('remove','id='.$vo['id']);?>">彻底删除</a>
					<a href="<?php echo U('recover','id='.$vo['id']);?>">还原</a>
				</td>
			</tr><?php endforeach; endif; else: echo "" ;endif; ?>
		<tr>
			<td colspan="9">
			    <?php echo ($data["pageStr"]); ?>
			</td>
		</tr>
	</table>

</body>
</html>